import JSZip = require("jszip");
import ZipAssetManager from "./zip_asset_manager";

export class ZipBundle extends cc.AssetManager.Bundle {
    protected _zip: JSZip;
    //在init之后执行
    initZip(zip: JSZip) {
        this._zip = zip;
        ZipAssetManager.zipPool.set(this.name, zip);
        for (let key in zip.files) {
            ZipAssetManager.filePool.set(key, zip.files[key]);
        }
    }
    get zip() {
        return this._zip;
    }
};